#!/usr/bin/env python
from string import find, split, join
import os
import sys

try:
    import settings # Assumed to be in the same directory.
except ImportError:
    pass

proj = join((split(sys.path[0],'/').pop(),'.'),'')
print proj
for x in settings.INSTALLED_APPS:
    n = find(x, proj) 
    if n == 0:
        os.system('python manage.py reset %s ' % (x[len(proj):]))
        print 'python manage.py reset %s' % (x[len(proj):])

